<?php
$config = [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'enableSchemaCache' => true,
            'dsn' => 'mysql:host=localhost;dbname=test_yii2advanced',
            'username' => 'test',
            'password' => '',
            'charset' => 'utf8mb4',
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            'useFileTransport' => true,
        ],
        'xcx' => [ // 小程序
            'class' => 'common\components\easy_wechat\EasyWechat',
            'appID' => "",
            'appSecret' => "",
            'type' => 2,
        ],
        'easyImage' => [
            'class' =>'common\components\image_beds\EasyImage',
            'baseUrl' => "http://",
            'token' => "",
        ],
        /*'fs' => [
            'class' => 'common\components\image_beds\EasyImageFs',
        ],*/
        'xunsearch' => [
            'class' => 'common\rewrites\hightman\xunsearch\Connection',
            'iniDirectory' => '@common/runtime/xunsearch', // 搜索 ini 文件目录
            'charset' => 'utf-8', // 指定项目使用的默认编码
            'serverIp' => '127.0.0.1',
        ],
    ],
    'params' => [
        'yiichina-username' => '',
        'yiichina-password' => '',
        'defaultCountyId' => 330603000000, // 柯桥
        'versions' => [
            'serverVersion' => 2025,
        ],
        'jwt' => [
            'adminApi' => [
                'reLoginStatusCode' => 5502, // 需要重新登录响应状态码
                'jwtThinkKey' => '', // 加密密钥
                'authDuration' => 86400 * 2, // 授权有效期
            ],
            'dlApi' => [
                'reLoginStatusCode' => 999,
                'jwtThinkKey' => '',
                'authDuration' => 86400 * 30,
            ],
            'xcxApi' => [
                'reLoginStatusCode' => 5602,
                'jwtThinkKey' => '',
                'authDuration' => 86400 * 1,
            ],
        ],
        'beiAn' => [ // 备案信息
            'href' => '',
            'numbering' => '',
        ],
    ],
];

return $config;
